[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 VAROFF VAR1,VAR2

 Function
  Sets a variable to the offset address of another variable.

 Syntax
  VAROFF src,dest

   src   - The variable to get the offset address of.
   dest  - The variable to store the offset address in.

 Remarks
  This statement is primarily useful in conjunction with DOINTR.  It may
  be necessary to give an interrupt the address of a memory location that
  can be used to store information.  This statement will allow you to get
  the offset address of a specified variable to pass to DOINTR.

 Examples
  ' Create subdirectory - DOS function 39h
  INTEGER saddr, oaddr
  STRING  path
  LET path = "C:\$TMPDIR$"
  VARSEG path,saddr
  VAROFF path,oaddr
  DOINTR 21h,39h,0,0,oaddr,0,0,0,saddr,0
  IF (REGCF() & (REGAX() = 3)) THEN
   PRINTLN "Error:  Path not found"
  ELSE IF (REGCF() & (REGAX() = 5)) THEN
   PRINTLN "Error:  Access Denied"
  ELSE IF (REGCF()) THEN
   PRINTLN "Error:  Unknown Error"
  ELSE
   PRINTLN "Directory successfully created..."
  ENDIF

See Also: MKADDR() VARADDR VARSEG
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson